package com.aiyige.utils;

import android.content.Intent;
import android.net.Uri;

import com.aiyige.MyApp;

import java.io.File;

/**
 * Created by zhuyakun on 2017/12/20.
 */

public class MediaUtil {
    public static void scanMedia(String path) {
        File file = new File(path);
        Uri uri = Uri.fromFile(file);
        Intent scanFileIntent = new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE, uri);
        MyApp.getInstance().sendBroadcast(scanFileIntent);
    }
}
